meson: gtk: remove internal static libs from declared gtk dependency
authorTim-Philipp Müller <tim@centricular.com>
Mon, 20 Mar 2017 16:26:13 +0000 (16:26 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Wed, 3 May 2017 14:10:54 +0000 (15:10 +0100)
gdk and gsk are no longer separate libs but part of gtk now, so any
Gtk+ user should just link to gtk, there's no need to additionally
link against all those static helper libs that go into the gtk lib.

This means we need to specifically add confinc to include_directories
in more places to make sure the right config.h (i.e. ours) gets
included and not a subproject's like graphene's config.h.

Not dragging in static libs also fixes the issue of all executables
having to be relinked for any and all changes. With this change
it's super-fast now and can be skipped for most changes that don't
touch the external ABI.

gtk/meson.build
tests/meson.build

index 3fb7d7257beaa946c9abf63b95e468e3385e2f57..8f9c08cb03a5bc716e1830602db8b145454c6e0c 100644 (file)
@@ -804,7 +804,8 @@ libgtk_dep = declare_dependency(
     gtktypebuiltins_c,
     gtktypebuiltins_h,
   ],
-  dependencies: gtk_deps + [libgdk_dep, libgsk_dep],
+  include_directories: [confinc],
+  dependencies: gtk_deps,
   link_with: libgtk,
   link_args: ['-Bsymbolic'],
   include_directories: [confinc, gtkinc]
index 2435e3d0e4f7e6ec9479c0acb7cd9a5f849afb85..be12e42cc65b2947f2d065511b67f04e821567f5 100644 (file)
@@ -145,6 +145,7 @@ foreach t : gtk_tests
   test_name = t.get(0)
   test_srcs = ['@0@.c'.format(test_name), t.get(1, [])]
   executable(test_name, test_srcs,
+    include_directories : [confinc, gdkinc],
     c_args : test_args,
     dependencies : [libgtk_dep, libm])
 endforeach